home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 80 / ataemu.doc next >
Encoding:
Text File  |  1986-11-20  |  9.9 KB  |  380 lines

  1. .PL 72
  2. ..
  3. L-------!-------!-------!-------!-------!-------!-------!------R
  4.  
  5.              ❎S o f t D e s i g n②
  6.  
  7.  
  8.    ❎CP/M-Z80 EMULATOR FOR ATARI TOS②
  9.  
  10.  
  11.  
  12.  
  13.                         O V E R V I E W
  14.  
  15.  
  16.  
  17. -  ⑦Realtimeá emulatio∈ oµ al∮ Z8ã instruction≤② ove≥ thσ ful∮ 64י    ì
  18.    addressinτ range.
  19.  
  20.  
  21. -  IJá completσ CP/M-8ã versio∈ 2.Ø compatiblσ systeϕ environmen⌠       ì
  22.    anΣá use≥ interfacσ i≤ implemented¼á ⑦al∮á CP/M-8ãá compatibleÆ   ì
  23.    ⑦programsÆ ca∈ bσ executed.
  24.  
  25.  
  26. -  Thσ Emulato≥ run≤ averagσ CP/M-8ã program≤ witΦ thσ speeΣá oµ ì
  27.    a 2 MH· Z8ã system.
  28.  
  29.  
  30. -  Thσá Emulato≥á make≤ ⑦an∙  ATARח Sק systemÆ  ac⌠ a≤á βá CP/M-8ã    ì
  31.    systeϕ withou⌠ an∙ hardwarσ o≥ softwarσ adaptation«
  32.     
  33.  
  34. -  Z8ã I/נ opcode≤ arσ supporteΣ b∙ β built-i∈ interfacσ t∩ use≥ ì
  35.    supplied drivers.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.      *******************************************************
  43.      *                                                     *
  44.      *     (C) 85    S o f t D e s i g n                   *
  45.      *               Lichtenfelser Str. 29                 *
  46.      *               D-8000 Muenchen 60                    *
  47.      *               West Germany                          *
  48.      *                                                     *
  49.      *               Tel.:  89 - 87 89 55                  *
  50.      *                                                     *     
  51.      *******************************************************
  52. .PA
  53.  
  54. è
  55.              ❎S o f t D e s i g n②
  56.  
  57.  
  58.    ❎CP/M-Z80 Emulator for ATARI TOS②
  59.  
  60.  
  61.  
  62.  
  63.         E M U L A T O R    I M P L E M E N T A T I O N
  64.  
  65.  
  66.  
  67. -ááThσá Emulato≥ i≤ completel∙ writte∈ i∈ assembl∙ languagσá anΣ ì
  68. áááuse≤ thσ largσ registe≥ framσ oµ thσ Mב 6800ã t∩ β maximum.
  69.  
  70. -ááZ8ãá opcodσá interpretatio∈á i≤á tablσá drive∈á t∩á speeΣá u≡ 
  71. áááexecutio∈ time«
  72. .PA
  73. è
  74.              ❎S o f t D e s i g n②
  75.  
  76.  
  77.    ❎CP/M-Z80 Emulator for ATARI TOS②
  78.  
  79.  
  80.  
  81.  
  82.        C P M Z 8 0   C C P   I M P L E M E N T A T I O N
  83.  
  84.  
  85.  
  86. -  Thσá Consolσ CommanΣ Processo≥ i≤ CP/ל 2.Ø upwarΣá compatiblσ ì
  87.    bu⌠ enhanceΣ i∈ man∙ respects.
  88.  
  89. -  User Memory (TPA) is 58KByte ("63 K CP/M").
  90.  
  91. -  CommanΣá file≤á no⌠á founΣ unde≥ thσ curren⌠á use≥á arσá als∩ ì
  92.    searcheΣ under user 0.
  93.  
  94. -  A∈á additiona∮  COPך commanΣ allow≤ thσ copyinτ oµ disδ file≤ ì
  95.    witΦá PIס likσ operation«á COPך show≤ thσ name≤ oµ thσá file≤ ì
  96.    beinτ copied.
  97.  
  98. -  Thσá DIפ commanΣ  show≤ a sorted directory of  disk files. It
  99.    displays  the sizσ  oµ eacΦ file¼á thσ tota∮ sizσ,  thσ tota∮
  100.    numbe≥ oµ file≤ and the amount of free space on the disk. 
  101.  
  102. -  A DIRS command displays a sorted directory of system files.
  103.  
  104. -  Thσ ERIJ commanΣ show≤ thσ namσ oµ eacΦ deleteΣ file.
  105.  
  106. -  Thσá REמá commanΣ allow≤ thσ use≥ t∩ omi⌠ onσ drivσá specifi      ì
  107.    cation.
  108.  
  109. -  Thσ use≥ ca∈ exi⌠ t∩ TOS b∙ a∈ EXIק command.
  110.  
  111. -  CommanΣá line≤á startinτá witΦ ";óá arσá ignoreΣá t∩á suppor⌠ ì
  112.    comment lines within submit files.
  113.  
  114. -  Submi⌠ processinτ ca∈ bσ initiateΣ froϕ an∙ defaul⌠ drivσ.
  115. .PA
  116. è
  117.              ❎S o f t D e s i g n②
  118.  
  119.  
  120.    ❎CP/M-Z80 Emulator for ATARI TOS②
  121.  
  122.  
  123.  
  124.  
  125.      C P M Z 8 0   B D O S   I M P L E M E N T A T I O N
  126.  
  127.  
  128.  
  129. -  Thσá BDOצá i≤ CP/ל 2.Ø upwarΣ compatiblσ witΦá man∙á interna∮ ì
  130.    improvements.
  131.  
  132. -  ChangeΣ disk≤ arσ automaticall∙ detecteΣ anΣ newl∙ loggeΣ in« ì
  133.    The infamous Control-C is no longer necessary.
  134.  
  135. -  O∈á disδ reaΣ anΣ writσ error≤ thσ use≥ ca∈ optionall∙á abor⌠ ì
  136.    or retry the operation or ignore the error.
  137.  
  138. -  Minor errors in version 2.2 of CP/M have been corrected.
  139.  
  140.  
  141.  
  142.  
  143.      C P M Z 8 0   B I O S   I M P L E M E N T A T I O N
  144.  
  145.  
  146.  
  147. -  Thσá BIOצ function≤ arσ directeΣ t∩ 6800ã routine≤ whicΦá usσ ì
  148.    thσ TOS BIOS.
  149.  
  150. -  Al∮ physica∮ I/נ device≤ implementeΣ unde≥ TOצ arσ accessiblσ ì
  151.    unde≥á CPMZ80«á Thσ printe≥ por⌠ i≤ mappeΣ t∩ thσ CPMZ8ã LST: ì
  152.    device¼á thσ TTY´á devicσ correspond≤ t∩ thσ modeϕ port¼á thσ ì
  153.    flopp∙ drive≤ ac⌠ a≤ A´á anΣ B´á drive≤ unde≥ CPMZ8ã anΣá thσ ì
  154.    CON: device accesses the keyboard and screen of the ATARI ST.
  155.  
  156. -  IJá full∙ implementeΣ CP/ל 2.Ø compatiblσ I/O-Bytσ allow≤á thσ ì
  157.    user to change the logical to physical I/O device mapping.
  158.  
  159. -ááThe CPMZ80 Emulator system needs no installation.
  160. .PA
  161. è
  162.              ❎S o f t D e s i g n②
  163.  
  164.  
  165.    ❎CP/M-Z80 Emulator for ATARI TOS②
  166.  
  167.  
  168.  
  169.  
  170.                    P E R F O R M A N C E
  171.  
  172.  
  173.  
  174. -ááPerformancσá varie≤ fo≥ differen⌠ programs«á Onσ majo≥ facto≥ ì
  175. ááái≤á thσ frequenc∙ oµ disδ access«á Program≤ witΦá heav∙á disδ ì
  176. áááI/נ ma∙ ru∈ eve∈ faste≥ tha∈ o∈ Z8ã hardwarσ becausσ thσ ful∮ ì
  177.    disδ speeΣ oµ thσ hos⌠ systeϕ i≤ availablσ t∩ emulateΣ CPMZ8ã ì
  178.    O∈ thσ othe≥ hanΣ extensivσ arithmetiπ computation≤ slo≈ dow∈ ì
  179.    thσ Emulator.
  180.  
  181. -  Thσ timσ rati∩ (Emulator/Z80⌐ betwee∈ thσ Emulato≥ o∈ β Õ MH· ì
  182.    6800ãá systeϕá anΣ β œ MH· Z8ã systeϕ wa≤ measureΣá fo≥á somσ ì
  183.    CP/M 2.2 program≤ :
  184.  
  185. áááextreme values:  0.6 and 6.0
  186. áááaverage:         2.0
  187. .PA
  188. è
  189.              ❎S o f t D e s i g n②
  190.  
  191.  
  192.                 ❎Operation of the②
  193.   ❎CP/M-Z80 Emulator for ATARI TOS②
  194.  
  195.  
  196.  
  197.  
  198.                  I N V O C A T I O N
  199.  
  200.  
  201.  
  202. To start the Emulator, simply type on the command line:
  203.  
  204. "CPMZ80 <Return>"
  205.  
  206. or
  207.  
  208. "CPMZ80 <CP/M-80 Commandline> <Return>"
  209.  
  210.  
  211. The CPMZ80 EMULATOR displays the prompt:
  212.  
  213. "Please change to CPMZ80 disk and press any key to continue"
  214.  
  215. Remove the TOS disk, enter a CPMZ80 disk and press a key.
  216.  
  217. Thσ firs⌠ commandlinσ put≤ yo⌡ i∈ thσ commanΣ modσ oµ β CP/ל 2.Ø ì
  218. systeϕá exactl∙á a≤ yo⌡ arσ useΣ t∩ witΦ an∙ Z8ãá hardwarσá CP/ל ì
  219. system«á Iµá yo⌡ specif∙ thσ optiona∮ CP/M-8ã commandline¼á thi≤ ì
  220. commanΣ i≤ directl∙ executeΣ b∙ thσ Emulator«á O∈á startup¼á thσ ì
  221. defaul⌠ drivσ i≤ se⌠ t∩ thσ samσ drivσ a≤ unde≥ TOS«á IJ completσ ì
  222. CP/לá 2.Ø compatiblσ systeϕ environmen⌠ i≤ implemented«á Thσ CCס ì
  223. use≥ interfacσ supplie≤ al∮ built-i∈ command≤ (DIR¼á ERA¼á  REN¼ ì
  224. SAVE¼á TYPE¼á USER⌐á anΣá loading/executinτá oµá program≤á (.COל ì
  225. files)« Additionally¼ COPך allow≤ t∩ cop∙ file≤ anΣ DIRצ show≤ β ì
  226. director∙á oµá systeϕ files«á EXIק ha≤ bee∈ addeΣ t∩á providσá β ì
  227. convenien⌠ wa∙ bacδ t∩ TOS.
  228.  
  229. Thσá BDOצá systeϕ interfacσ i≤ totall∙ compatiblσ t∩á CP/לá 2.2« ì
  230. Ful∮á implementatio∈ oµ thσ BIOצ interfacσá permit≤á applicatio∈ ì
  231. program≤ t∩ usσ direc⌠ BIOצ acces≤ (eve∈ disδ related).
  232. .PA
  233.  
  234. è
  235.              ❎S o f t D e s i g n②
  236.  
  237.  
  238.                 ❎Operation of the②
  239.   ❎CP/M-Z80 Emulator for ATARI TOS②
  240.  
  241.  
  242.  
  243.  
  244.            חáמ ק ד פ ה IJ ב ד   ק נ   ר צ ד פ   ח » נì
  245.  
  246.  
  247.  
  248. IJá specia∮á interfacσ i≤ provideΣ t∩ linδ 6800ã hardwarσ I/נá t∩ ì
  249. Z8ãá programs«á IJá use≥ supplieΣ I/נ drive≥á ca∈á optionall∙á bσ ì
  250. activated«á Whe∈ thσ Emulato≥ i≤ started¼á i⌠ look≤ fo≥ thσ filσ ì
  251. 'EMUIO.PRG'«á Thσ Emulato≥ trie≤ t∩ ope∈ thi≤ filσ anΣ loaΣá it« ì
  252. Iµ thσ filσ wa≤ loadeΣ successfully¼ thσ I/נ drive≥ i≤ activateΣ ì
  253. anΣ thσ message
  254.  
  255.  "Emulator I/O driver installed"
  256.  
  257. i≤á shown«á Iµá β hardwarσ I/נ drive≥ canno⌠ bσ found¼á Z8ãá I/נ ì
  258. opcode≤ i∈ emulateΣ program≤ leaΣ t∩ thσ message
  259.  
  260.  "Emulator error =>  Illegal opcode : XX XX  at address : XXXX"
  261.  
  262. and the Emulator is aborted.
  263. .PA
  264.  
  265. è
  266.              ❎S o f t D e s i g n②
  267.  
  268.  
  269.                 ❎Operation of the②
  270.   ❎CP/M-Z80 Emulator for ATARI TOS②
  271.  
  272.  
  273.  
  274.  
  275.           G E N E R A L   R E S T R I C T I O N S
  276.  
  277.  
  278.  
  279. Thσá Emulato≥á doe≤ no⌠ suppor⌠ an∙ undocumenteΣ Z8ã opcode≤á o≥ ì
  280. hardwarσá dependan⌠ opcode≤ sucΦ a≤ interrup⌠á control«á Iµá thσ ì
  281. Emulato≥ find≤ sucΦ opcode≤ i∈ emulateΣ programs¼ i⌠ abort≤ witΦ ì
  282. thσ message:
  283.  
  284.  "Emulator error =>  Illegal opcode : XX XX  at address : XXXX"
  285. .PA
  286.  
  287. è
  288.              ❎S o f t D e s i g n②
  289.  
  290.  
  291.                 ❎Operation of the②
  292.   ❎CP/M-Z80 Emulator for ATARI TOS②
  293.  
  294.  
  295.  
  296.  
  297.  
  298.        D E M O   V E R S I O N   R E S T R I C T I O N S
  299.  
  300.  
  301.  
  302. Thσá dem∩á versio∈á oµ thσ Emulato≥ show≤ "Demoó i∈á thσá signo∈ ì
  303. message«á I⌠á i≤á fo≥ demonstratio∈ purpose≤ onl∙ anΣá ha≤á bee∈ ì
  304. modifieΣ i∈ thσ followinτ aspects:
  305.  
  306. - The signon message appears at every warmstart.
  307.  
  308. - Disk write access is disabled.
  309.  
  310. - Input/Outpu⌠ o∈ thσ logica∮ device≤ LST:¼á PUN´á anΣá RDR´á i≤ ì
  311.   ignored.
  312. .PA
  313. è
  314.              ❎S o f t D e s i g n②
  315.  
  316.  
  317.     ❎Optional I/O opcode support②
  318.  
  319.  
  320.  
  321.  
  322.           I / O   D R I V E R   C O N V E N T I O N S
  323.  
  324.  
  325.  
  326. Iµ β use≥ drive≥ i≤ activated¼á thσ Z8ã I/O opcode≤ arσ directeΣ ì
  327. int∩á thi≤á driver«á Thσá drive≥ ha≤ t∩ bσ βá use≥á codeΣá 6800ã ì
  328. prograϕ witΦ thσ followinτ conventions´ 
  329.  
  330. - Thσá drive≥ codσ mus⌠ begi∈ witΦ tw∩á jum≡á instructions«á Thσ ì
  331.   firs⌠á jum≡ i≤ useΣ b∙ al∮ inpu⌠  request≤ anΣ  thσ seconΣá b∙ ì
  332.   al∮ outpu⌠ requests.
  333.  
  334. - Thesσá jump≤ leaΣ t∩ thσ use≥ inpu⌠ anΣ outpu⌠   servicσ   rouì
  335.   tines«á Thesσ routine≤ terminatσ witΦ β Retur∈ froϕá Subroutinσ ì
  336.   RTצ instruction.
  337.  
  338. - Thσ inpu⌠ routinσ receive≤ thσ Z8ã por⌠ numbe≥ i∈ thσ lo≈ bytσ ì
  339.   oµ registe≥ Dã anΣ mus⌠ retur∈ thσ inpu⌠ valuσ i∈ thσ lo≈ bytσ ì
  340.   oµ D0«
  341.  
  342. - Thσá outpu⌠á routinσ receive≤ thσ Z8ã por⌠ numbe≥ i∈á thσá lo≈ ì
  343.   bytσá oµ registe≥ Dã anΣ thσ outpu⌠ valuσ i∈ thσ lo≈á bytσá oµ   ì
  344.   D1.
  345.  
  346. - Al∮ register≤ ma∙ bσ useΣ withi∈ thσ use≥ driver.
  347.  
  348. - The user driver must be supplied as a TOS ".PRG" file.
  349. .PA
  350.  
  351. è
  352.              ❎S o f t D e s i g n②
  353.  
  354.  
  355.     ❎Optional I/O opcode support②
  356.  
  357.  
  358.  
  359.          U S E R   I / O   D R I V E R   E X A M P L E
  360.  
  361.  
  362.  
  363. Thi≤ simplσ 6800ã codσ examplσ show≤ ho≈ t∩ acces≤ 1À contiguou≤ ì
  364. I/נá port≤á froϕá startaddres≤ $FFFF8õ througΦá $FFFF9הá o∈á odΣ ì
  365. addresses«á Fo≥á examplσá thσ Z8ã instructio∈ Iמ A,(07H⌐á i∈á a∈ ì
  366. emulated program would read a byte from 68000 address $FFFF8F.
  367.  
  368.  
  369.  
  370.             .TEXT
  371.  
  372.  
  373.         IOBASE: .EQU    $FFFF80
  374.  
  375.  
  376.         IO:    JMP    INPUT
  377.             JMP    OUTPUT
  378.  
  379.  
  380.         INPUT:    MOVE.L  #IOBASE,A0
  381.                 AND.W   #$000F,D0
  382.                 ADD.W   D0,D0
  383.                 MOVE.B  1(A0,D0.W),D0
  384.                 RTS
  385.  
  386.  
  387.         OUTPUT:    MOVE.L  #IOBASE,A0
  388.                 AND.W   #$000F,D0
  389.                 ADD.W   D0,D0
  390.                 MOVE.B  D1,1(A0,D0.W)
  391.             RTS
  392.  
  393.  
  394.             .END
  395. əəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəəə